<?php

$url = "http://www.google.com/m/services/trends/get?hl=zh-TW&gl=tw&category=web&nocache=".time();

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
//echo "<pre>";print_r($result);echo "</pre>";
curl_close($ch);
$doc = new DOMDocument();
		
$doc->strictErrorChecking = FALSE;		
$doc->loadXML($result);
$xml = simplexml_import_dom($doc);